package com.nbst.model.mes;

/**
 * 
 * @ClassName: IcmoLockIcmo
 * @Description:生产任务单关联另一个生产任务单的数量,如果rank为-2则说明该任务单是装配任务单是给销售订单的
 * @author King
 * @date 2018年12月5日
 *
 */
public class IcmoLockIcmo implements Comparable<IcmoLockIcmo> {

	/** 源生产任务单id（就是提供产品给另一个生产任务单） */
	private Integer fSourceIcmoId;

	/** 目标生产任务单（就是基于另一个生产任务单的物料生产的任务单） */
	private Integer ftargetIcmoId;

	/** 源生产任务单UUID */
	private String fSourceIcmoUUID;

	/** 目标生产任务单UUID */
	private String ftargetIcmoUUID;

	/** 关联数量 */
	private Double fQty;

	/** 物料内码 */
	private Integer fItemId;

	/** 销售订单分录表内码 */
	private Integer fDetailID;

	/** 是否为销售订单产品 */
	private Integer fIsOrderItem;

	/** 该销售订单产品体系中该物料的上级物料代码 */
	private String fParentNumber;

	/** 是否初始化 */
	private String isready;

	/** 目标任务单在Bom中的层级 0为0级Bom物料任务单锁1级Bom物料任务单 -1为装配单锁生产任务单 -2为销售单锁装配单 */
	private Integer tRank;

	/** 已用数 */
	private Double fUsedQty;

	private Long times;

	private Integer fClosed;

	public Integer getfSourceIcmoId() {
		return fSourceIcmoId;
	}

	public void setfSourceIcmoId(Integer fSourceIcmoId) {
		this.fSourceIcmoId = fSourceIcmoId;
	}

	public Integer getFtargetIcmoId() {
		return ftargetIcmoId;
	}

	public void setFtargetIcmoId(Integer ftargetIcmoId) {
		this.ftargetIcmoId = ftargetIcmoId;
	}

	public String getfSourceIcmoUUID() {
		return fSourceIcmoUUID;
	}

	public void setfSourceIcmoUUID(String fSourceIcmoUUID) {
		this.fSourceIcmoUUID = fSourceIcmoUUID == null ? null : fSourceIcmoUUID.trim();
	}

	public String getFtargetIcmoUUID() {
		return ftargetIcmoUUID;
	}

	public void setFtargetIcmoUUID(String ftargetIcmoUUID) {
		this.ftargetIcmoUUID = ftargetIcmoUUID == null ? null : ftargetIcmoUUID.trim();
	}

	public Double getfQty() {
		return fQty;
	}

	public void setfQty(Double fQty) {
		this.fQty = fQty;
	}

	public Integer getfItemId() {
		return fItemId;
	}

	public void setfItemId(Integer fItemId) {
		this.fItemId = fItemId;
	}

	public Integer getfDetailID() {
		return fDetailID;
	}

	public void setfDetailID(Integer fDetailID) {
		this.fDetailID = fDetailID;
	}

	public String getfParentNumber() {
		return fParentNumber;
	}

	public void setfParentNumber(String fParentNumber) {
		this.fParentNumber = fParentNumber;
	}

	public Integer gettRank() {
		return tRank;
	}

	public void settRank(Integer tRank) {
		this.tRank = tRank;
	}

	public Integer getfIsOrderItem() {
		return fIsOrderItem;
	}

	public void setfIsOrderItem(Integer fIsOrderItem) {
		this.fIsOrderItem = fIsOrderItem;
	}

	public Double getfUsedQty() {
		return fUsedQty;
	}

	public void setfUsedQty(Double fUsedQty) {
		this.fUsedQty = fUsedQty;
	}

	public Long getTimes() {
		return times;
	}

	public void setTimes(Long times) {
		this.times = times;
	}

	public String getIsready() {
		return isready;
	}

	public void setIsready(String isready) {
		this.isready = isready;
	}

	public Integer getfClosed() {
		return fClosed;
	}

	public void setfClosed(Integer fClosed) {
		this.fClosed = fClosed;
	}

	@Override
	public String toString() {
		return "IcmoLockIcmo [fSourceIcmoId=" + fSourceIcmoId + ", ftargetIcmoId=" + ftargetIcmoId
				+ ", fSourceIcmoUUID=" + fSourceIcmoUUID + ", ftargetIcmoUUID=" + ftargetIcmoUUID + ", fQty=" + fQty
				+ ", fItemId=" + fItemId + ", fDetailID=" + fDetailID + ", fIsOrderItem=" + fIsOrderItem
				+ ", fParentNumber=" + fParentNumber + ", isready=" + isready + ", tRank=" + tRank + ", fUsedQty="
				+ fUsedQty + ", times=" + times + ", fClosed=" + fClosed + "]";
	}

	@Override
	public int compareTo(IcmoLockIcmo o) {
		return this.times.compareTo(o.getTimes());
	}
}